Hi, |
Re: Slow loop question What can make it slow is what you do in the loop. Looping and filling a Skip followed by looping the Skip will be slower. |
Re: Slow loop question SystemAdmin - Thu Feb 14 11:53:06 EST 2013 Best, Frank |
Re: Slow loop question The loop is not particulary slow, but is very slow if you figure to do it many many times; such as looking for a particular object with a particular object ID. So if you are in need to do such things; the Skip list approach is far faster:
Skip skpObjects = createString()
for o in entire mod do {put(skpObjects, identifier(o), o)}
body:
if (find(skpObjects, identifier(oTarget), oTarget)) then process oTarget
delete(skpObjects)
|
Re: Slow loop question llandale - Thu Feb 14 15:13:27 EST 2013 The loop is not particulary slow, but is very slow if you figure to do it many many times; such as looking for a particular object with a particular object ID. So if you are in need to do such things; the Skip list approach is far faster:
Skip skpObjects = createString()
for o in entire mod do {put(skpObjects, identifier(o), o)}
body:
if (find(skpObjects, identifier(oTarget), oTarget)) then process oTarget
delete(skpObjects)
|